//
//  MainViewController.m
//  QuickReadComic
//
//  Created by 苗钧豪 on 16/8/26.
//  Copyright © 2016年 苗钧豪. All rights reserved.
//

#import "MainViewController.h"
#import "ComicViewController.h"
#import "FoundViewController.h"
#import "VCommunityViewController.h"
#import "MineViewController.h"
@interface MainViewController ()

@end

@implementation MainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    // 创建一系列的ViewController
    ComicViewController *CVC = [[ComicViewController alloc]init];
    UINavigationController *nacvc = [[UINavigationController alloc]initWithRootViewController:CVC];
    UITabBarItem *item1 = [[UITabBarItem alloc]initWithTitle:@"漫画" image:[UIImage imageNamed:@"主页 (1)"] tag:101];
    nacvc.tabBarItem = item1;
    
    FoundViewController *FVC = [[FoundViewController alloc]init];
    UINavigationController *nafvc = [[UINavigationController alloc]initWithRootViewController:FVC];
    UITabBarItem *item2 = [[UITabBarItem alloc]initWithTitle:@"发现" image:[UIImage imageNamed:@"发现 (1)"] tag:102];
    nafvc.tabBarItem = item2;
    
    VCommunityViewController *VVC = [[VCommunityViewController alloc]init];
    UINavigationController *navvc = [[UINavigationController alloc]initWithRootViewController:VVC];
    UITabBarItem *item3 = [[UITabBarItem alloc]initWithTitle:@"V社区" image:[UIImage imageNamed:@"社区"] tag:103];
    navvc.tabBarItem = item3;
    
    MineViewController *MVC = [[MineViewController alloc]init];
    UITabBarItem *item4 = [[UITabBarItem alloc]initWithTitle:@"我的" image:[UIImage imageNamed:@"我的 (1)"] tag:104];
    MVC.tabBarItem = item4;
    
    self.viewControllers = @[nacvc,nafvc,navvc,MVC];
    [self.tabBar setTintColor:[UIColor colorWithRed:0.953 green:0.651 blue:0.075 alpha:1.000]];
    [self.tabBar setBarTintColor:[UIColor whiteColor]];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
